package com.hn.gege.sys.modules.record.service.impl;

import com.hn.gege.sys.modules.record.entity.Export;
import com.hn.gege.sys.modules.record.mapper.ExportMapper;
import com.hn.gege.sys.modules.record.service.IExportService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;

/**
 * <p>
 * 导出记录 服务实现类
 * </p>
 *
 * @author zxy
 * @since 2021-08-30
 */
@Service
public class ExportServiceImpl extends ServiceImpl<ExportMapper, Export> implements IExportService {

    @Override
    public Export getByPk(String id) {
        LambdaQueryWrapper<Export> lambda = new QueryWrapper<Export>().lambda()
                .eq(Export::getId, id);
        return baseMapper.selectOne(lambda);
}

    @Override
    public boolean updateByPk(Export export) {
        LambdaQueryWrapper<Export> lambda = new QueryWrapper<Export>().lambda()
                .eq(Export::getId, export.getId());
        return super.update(export, lambda);
    }

    @Override
    public boolean removeByPk(String id) {
        LambdaQueryWrapper<Export> lambda = new QueryWrapper<Export>().lambda()
                .eq(Export::getId, id);
        return super.remove(lambda);
    }

}
